package org.example.mq.mqserver.core;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class BrokerServerRunner implements CommandLineRunner {

    @Autowired
    private BrokerServer brokerServer;

    @Override
    public void run(String... args) {
        brokerServer.createVirtualHost("default");
        System.out.println("默认 VirtualHost 创建完成");
    }
}
